package cn.kongwg.controller;

import cn.kongwg.entity.Person;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kongwg
 * @create 2021-03-12 18:38
 */
@RestController
public class HelloController {

    @Autowired
    Person person;

    @RequestMapping("/hello")
    public String hello() {

        return "hello springboot";
    }

    @RequestMapping("/person")
    public Person person() {

        System.out.println(person.getUserName());

        return person;
    }
}
